package com.springboot.fwwb09.service;


import com.springboot.fwwb09.dao.stationDAO;
import com.springboot.fwwb09.entity.station;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional//控制事务
public class stationServiceImpl implements stationService{

    @Autowired
    private stationDAO stationDAO;

    @Override
    @Transactional(propagation = Propagation.SUPPORTS)
    public List<station> findAll() {
        return stationDAO.findAll();
    }

}
